package com.action.addrbook;

import com.db.addrbook.ZipcodeDAO;
import java.util.*;

public class ZipcodeListAction {
	private String dong;
	private List zclist;
	private ZipcodeDAO zcDAO;
	
	public void setZcDAO(ZipcodeDAO zcDAO) {
		this.zcDAO = zcDAO;
	}
	public void setDong(String dong) {
		this.dong = dong;
	}
	public List getZclist() {
		return zclist;
	}

	public String execute(){
		String result = "";		
		try {			
			if(dong != null){
				zclist = zcDAO.zipcodeFind(dong);	
			}									
			result = "success";
		} catch (Exception e) {
			System.out.println("ZipcodeListAction.execute():"+e.toString());
			result = "error";
		}
		return result;
	}
}
